var GameItem = function(src)
{
	this.name="";
	this.color="";
	this.x=0;
	this.y=0;
	this.width=0;
	this.height=0;
	//status to display or hide
	this.active=false;
	//this.active=true;
	this.angle=0;
	
//	if(src!="img/skin/body_299x416_0x110.png")
//	{
//		this.image = new Image();
//		this.image.src=src;
//	} else {
		this.image = images[src];
//	}
	this.draw = function(graphic)
	{
		
		if(this.active)
		{
			if(this.name=="star")
			{
				graphic.save();
	            graphic.translate(parseInt(this.x), parseInt(this.y));

	            graphic.rotate(this.angle);
	            graphic.drawImage(this.image, -this.width / 2, -this.height/2,
	                    this.width, this.height);

	            graphic.translate(-parseInt(this.y), -parseInt(this.y));
	            graphic.restore();
			}
			else
			{
				graphic.drawImage(this.image,parseInt(this.x), parseInt(this.y), this.width, this.height);
			}
		}
		
	};

	
};